package ar.edu.unlam.tpfinal.tests.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;

public class TestLogHelper {
	private static final Logger LOG = LoggerFactory.getLogger(TestLogHelper.class);
	public static final String TEST_NAME = "testname";
	
	public static void startTestLogging(String name) {
	    MDC.put(TEST_NAME, name);
		LOG.info("Ingresado test al MDC para log");
	}
	
	public static String stopTestLogging() {
		String name = MDC.get(TEST_NAME);
		LOG.info("Quitado test del MDC para log");
		MDC.remove(TEST_NAME);
		
		return name;
	}
}
